//
//  ViewController.m
//  PingTest
//
//  Created by zgy on 2025/4/16.
//

#import "ViewController.h"
#import "GBPingHelper.h"


@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor lightGrayColor];
    
    GBPingHelper *helper = [GBPingHelper ping:@"1.2.3.4" timeout:2 pingPeriod:20 callback:^(GBPingResType resType, GBPingSummary *pingSummary, NSError *error) {
        NSLog(@"%zd   %@", resType, pingSummary);
    }];
    
    GBPingHelper *helper1 = [GBPingHelper ping:@"www.baidu.com" timeout:2 pingPeriod:20 callback:^(GBPingResType resType, GBPingSummary *pingSummary, NSError *error) {
        NSLog(@"%zd   %@", resType, pingSummary);
    }];
    
    GBPingHelper *helper2 = [GBPingHelper ping:@"111.222.222.111" timeout:2 pingPeriod:20 callback:^(GBPingResType resType, GBPingSummary *pingSummary, NSError *error) {
        NSLog(@"%zd   %@", resType, pingSummary);
    }];
    
    GBPingHelper *helper3 = [GBPingHelper ping:@"sit-pxgateway.yundasys.com" timeout:5 pingPeriod:20 callback:^(GBPingResType resType, GBPingSummary *pingSummary, NSError *error) {
        NSLog(@"%zd   %@", resType, pingSummary);
    }];

}


@end
